package fitness;

import java.text.DecimalFormat;
import optimizers.ganeat.xor.ConstantsXOR;

import util.MyUtil;

public class OscillatorBasedResult extends FitnessResult {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	public double mse;
	public double count;
	public double sde;
	public double average;
	public double limitcycle;

	@Override
	public double finalResult() {
		// return (sd/(25*600) +1 / mse/ (1+ (average-5)*(average-5)));
		return 1000 * sde / mse * limitcycle;
	}

	@Override
	public String toString() {
		return common.Static.df4.format(finalResult())
				+ " = "
				+ common.Static.df4.format(sde * 1000)
				+ "/"
				+ (mse == Double.MAX_VALUE ? "MAX_VALUE" : common.Static.df4
						.format(mse)) + "*"
				+ common.Static.df4.format(limitcycle);
	}

	@Override
	public Double[] getDecomposition() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public boolean goodSolution() {
		// TODO Auto-generated method stub
		return false;
	}

}
